package br.com.binding.rebind.template;

import br.com.binding.rebind.ListenerTemplate;

import br.com.binding.client.bind.annotations.ActionBind;
import com.google.gwt.core.ext.typeinfo.JField;

public class ListBoxListenerTemplate implements ListenerTemplate {
    
  protected static String nl;
  public static synchronized ListBoxListenerTemplate create(String lineSeparator)
  {
    nl = lineSeparator;
    ListBoxListenerTemplate result = new ListBoxListenerTemplate();
    nl = null;
    return result;
  }

  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
    /* (non-javadoc)
     * @see IGenerator#generate(Object)
     */
    public String generate(Object argument)
  {
    final StringBuffer stringBuffer = new StringBuffer();
      
    JField field = (JField)argument;
    ActionBind bind = field.getAnnotation(ActionBind.class);

    return stringBuffer.toString();
  }
} 